package xun.lu.study.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xun.lu.study.pojo.Dish;
import xun.lu.study.service.DishService;

@RestController
public class DishController {
@Autowired
private DishService dishService;
@RequestMapping("/findById")
    public Dish findById(int id){
        return dishService.findById(id);
}
@RequestMapping("/adddish")
    public void adddish(Dish dish){
    dishService.adddish(dish);
}

@RequestMapping("/Update")
    public void Update(Dish dish){
    dishService.Update(dish);
}

@RequestMapping("/Delete")
    public void Delete(int id){
    dishService.Delete(id);
}

}
